class_name PausingView
extends BaseView

#region 属性
@onready var continue_btn: Button = %ContinueBtn
@onready var setting_btn: Button = %SettingBtn
@onready var main_menu_btn: Button = %MainMenuBtn
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
func init_view():
	super.init_view()
	continue_btn.pressed.connect(_continue_btn_pressed)
	setting_btn.pressed.connect(_setting_btn_pressed)
	main_menu_btn.pressed.connect(_main_menu_btn_pressed)
func on_enter(args:Dictionary = {}):
	super.on_enter()
	GameManager.translate_game_state(GameEnum.GameState.Pausing)
func on_pause(args:Dictionary = {}):
	super.on_pause()
func on_resume(args:Dictionary = {}):
	super.on_resume()
func on_exit(args:Dictionary = {}):
	super.on_exit()
func get_view_state() -> GameEnum.ViewState:
	return super.get_view_state()
#endregion
#region 公共方法
#endregion
#region 私有方法
func _continue_btn_pressed():
	GameUISystem.view_manager.close_view(GameEnum.ViewType.PausingView)
	# TODO 并不一定返回Gaming，先暂时定为Gaming
	GameUISystem.view_manager.open_view(GameEnum.ViewType.GamingView)
func _setting_btn_pressed():
	pass
func _main_menu_btn_pressed():
	GameUISystem.view_manager.close_view(GameEnum.ViewType.PausingView)
	# TODO 结算一下
	GameUISystem.view_manager.open_view(GameEnum.ViewType.MainMenuView)
#endregion
#region 生命周期函数
#endregion
